<?php
include "konek.php";
if(!isset($_GET['id']))
{
echo 'ERROR';
}
else
{
$id=$_GET['id'];
$judul=$_POST['judul'];
$mapel=$_POST['mapel'];
$kls=$_POST['kls'];
$isi=$_POST['area'];
/*$date=$date.date("Y-m-d H-i-s");*/
$sql=mysql_query("update posting set judul='$judul', kelas ='$kls', kategori = '$mapel', isi = '$isi' where idpost ='$id' ") or die(mysql_error());
header('location:../page/listpost.php');

}
?>